<template>
  <el-table
      ref="multipleTable"
      :data="tableData3"
      tooltip-effect="dark"
      style="width: 100%">
    <el-table-column
        type="selection"
        width="55">
    </el-table-column>
    <el-table-column
        label="编号"
        width="120">
      <template slot-scope="scope">{{ scope.row.id}}</template>
    </el-table-column>
    <el-table-column
        prop="order"
        label="优惠券序列号">
    </el-table-column>
    <el-table-column
        prop="danNumber"
        label="订单号">
    </el-table-column>
    <el-table-column
        prop="user"
        label="使用会员">
    </el-table-column>
    <el-table-column
        prop="date"
        label="使用时间">
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button @click="leave(scope.row.id)" type="text" size="small"><span class="size"><i class="el-icon-delete"></i></span></el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: "look",
  data() {
    return {
      tableData3: [{
        id: '1',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      },{
        id: '2',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      },{
        id: '3',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      },{
        id: '4',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      },{
        id: '5',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      },{
        id: '6',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      },{
        id: '7',
        order: '2017061515',
        danNumber: '201709124856700123',
        user:'不知道先生',
        date:'2017-09-06 09:12:00'
      }],
    }
  },
  methods: {
    leave(row){
      this.$axios.post('http://localhost:8888/user/delete',{id:row}).then((res)=>{
        //将修改操作的返回结果打印
        console.log(res);
      })
    }
  }
}
</script>

<style scoped>
.size{
  font-size: 20px;
}
</style>